/**
* All Rights Reserved , Copyright (C) 2022 , 青岛鼎信通讯股份有限公司
*
* MmsProvinceCityMatchinfoServiceAuto
* 省份地市信息表新
*
* 修改纪录
* 2022-01-10 版本：1.0 wangjielei 创建。
* @version 版本：1.0
* @author 作者：wangjielei
* 创建日期：2022-01-10
*/

package com.topscomm.mms.service.impl.auto;

import javax.annotation.Resource;
import com.topscomm.basic.IBasicDao;
import com.topscomm.tap.common.DatacodeCache;
import java.util.Map;
import com.topscomm.mms.*;
import com.topscomm.mms.pojo.MmsProvinceCityMatchinfoEntity;
import com.topscomm.mms.dao.IMmsProvinceCityMatchinfoDao;


public class MmsProvinceCityMatchinfoServiceAuto extends MmsService<MmsProvinceCityMatchinfoEntity,IMmsProvinceCityMatchinfoDao> {

	/**
	 * @author: wangjielei
	 * @date: 2022-01-10
	 * @param mapRow
	 * @description:设置字段显示值
	 * @modify:
	 */
	@Override
	public void setDispFields(Map<String, Object> mapRow, DatacodeCache datacodeCache) {
		String temp;
		if (mapRow.get("deptcommoncode") != null) {
			temp = mapRow.get("deptcommoncode").toString();
			mapRow.put("dispdeptcommoncode", datacodeCache.getValueDynamic("DeptCommonCodeTrack", temp, "code", "name"));
		}
		if (mapRow.get("namecode") != null) {
			temp = mapRow.get("namecode").toString();
			mapRow.put("dispnamecode", datacodeCache.getValueDynamic("DeptCommonCode2", temp, "code", "name"));
		}
		if (mapRow.get("arealevel") != null) {
			temp = mapRow.get("arealevel").toString();
			mapRow.put("disparealevel", datacodeCache.getValueDynamic("AreaLevel", temp, "code", "name"));
		}
		if (mapRow.get("areaauthorizationusercode") != null) {
			temp = mapRow.get("areaauthorizationusercode").toString();
			mapRow.put("dispareaauthorizationusercode", datacodeCache.getValueDynamic("CboUser", temp, "code", "name"));
		}
		if (mapRow.get("enabled") != null) {
			temp = mapRow.get("enabled").toString();
			mapRow.put("dispenabled", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
	}

	@Override
	@Resource(name = "mmsProvinceCityMatchinfoDao")
	public void setDao(IBasicDao<MmsProvinceCityMatchinfoEntity> dao) {
		super.setDao(dao);
	}
}
